package self.hoy.demo.grainmall.search.vo;

import lombok.Data;
import self.hoy.demo.common.to.es.SpuEsModel;

import java.io.Serializable;
import java.util.List;

/**
 * @author hyh
 * @date 2020/7/22
 */
@Data
public class SearchResult implements Serializable {
    private static final long serialVersionUID = -8936422895647628693L;

    private List<SpuEsModel> products;

    private List<BrandVo> brands;

    private List<CategoryVo> catalogs;

    private List<AttrVo> attrs;

    /**
     * 当前页面
     */
    private Integer pageNum;

    /**
     * 总页数
     */
    private Integer totalPage;

    /**
     * 总记录数
     */
    private Long total;

    @Data
    public static class AttrVo implements Serializable {
        private Long attrId;
        private String attrName;
        private List<String> attrValue;
    }

    @Data
    public static class BrandVo implements Serializable {
        private Long brandId;
        private String brandName;
        private String brandImg;
    }

    @Data
    public static class CategoryVo implements Serializable {
        private Long catalogId;
        private String catalogName;
    }
}
